package Scene6;

import Picture.GameImage;
import Scene1.Scene1;
import Scnen3.Scene3;

import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;

public class SpeakPanel2 extends JPanel {
    public int again = 0;
    Scene3 scene3 = new Scene3();
    public int begin = 0;
    Scene6 scene6 = new Scene6();
    BufferedImage imgP = GameImage.get("/Picture/bg.png");
    BufferedImage imgF = GameImage.get("/Picture/场景3-小精灵台词图片/1.png");
    Scene1 scene1 = new Scene1();
    JFrame frame;
    public SpeakPanel2(JFrame frame){
        this.frame = frame;


    }
    public void changeFont() {
        if(!scene6.stackFont.isEmpty())
        imgF = scene6.stackFont.pop();
        repaint();
    }

    public void changePic() {
        imgP = scene6.stackPic.pop();

    }
    public void reSize(){
        frame.setSize(1550,1180);
    }
    public void paint(Graphics g){
        g.drawImage(imgP,0,0,null);
        if(begin==0) {
            g.drawImage(GameImage.get("/Picture/NPC/npc.png"), -80, 450, null);
            g.drawImage(scene1.map.get("聊天框"), 250, 800, null);
            g.drawImage(scene1.map.get("箭头"), 1200, 970, null);
            g.drawImage(imgF, 360, 840, null);
        }
        else{
            g.drawImage(scene3.map.get("提示框"), 700-200, 200-100, null);
            g.drawImage(GameImage.get("/Picture/种树图片/1.png"), 920-200, 450-100, null);
            g.drawImage(GameImage.get("/Picture/种树图片/2.png"), 850-250, 550-130, null);
            g.drawImage(GameImage.get("/Picture/种树图片/3.png"), 940-200, 750-100, null);
            g.drawImage(GameImage.get("/Picture/种树图片/4.png"), 750-200, 850-100, null);
            g.drawImage(scene3.map.get("log"), 800-200, 400-100, null);
            g.drawImage(scene3.map.get("log"), 800-200, 700-100, null);
            g.drawImage(scene3.map.get("button"), 900-200, 1030-100, null);
            g.drawImage(scene3.map.get("begin"), 910-200, 1040-100, null);
            g.drawImage(scene3.map.get("dec1"), 700-200, 350-100, null);
            g.drawImage(scene3.map.get("dec2"), 700-200, 400-100, null);
            g.drawImage(scene3.map.get("dec1"), 700-200, 500-100, null);
            g.drawImage(scene3.map.get("dec2"), 700-200, 600-100, null);
            g.drawImage(scene3.map.get("dec1"), 700-200, 650-100, null);
            g.drawImage(scene3.map.get("dec2"), 700-200, 800-100, null);
            g.drawImage(scene3.map.get("dec1"), 700-200, 800-100, null);
            g.drawImage(scene3.map.get("dec1"), 700-200, 950-100, null);
            g.drawImage(scene3.map.get("dec2"), 700-200, 1000-100, null);


            g.drawImage(scene3.map.get("dec1-"), 1280-200, 350-100, null);
            g.drawImage(scene3.map.get("dec2-"), 1280-200, 400-100, null);
            g.drawImage(scene3.map.get("dec1-"), 1280-200, 500-100, null);
            g.drawImage(scene3.map.get("dec2-"), 1280-200, 600-100, null);
            g.drawImage(scene3.map.get("dec1-"), 1280-200, 650-100, null);
            g.drawImage(scene3.map.get("dec2-"), 1280-200, 800-100, null);
            g.drawImage(scene3.map.get("dec1-"), 1280-200, 800-100, null);
            g.drawImage(scene3.map.get("dec1-"), 1280-200, 950-100, null);
            g.drawImage(scene3.map.get("dec2-"), 1280-200, 1000-100, null);

        }

    }

}
